package views
{
	import inerface.INewFunctionPreviewPanel;
	
	import main.ViewSubBase;
	
	import panel.newFunctionPreview.NewFunctionPreview;
	
	public class NewFunctionPreviewView extends ViewSubBase
	{
		private var _panel:INewFunctionPreviewPanel;
		
		public function NewFunctionPreviewView()
		{
			super();
		}
		
		public override function show():void
		{
			render();
		}
		
		protected override function render():void
		{
			view.background.show();
			view.guide.show();
			view.mainPanel.show();
			return;
			if(_panel == null){
				_panel = new NewFunctionPreview();
				_panel.init(view.layout.stage,view.resourceLoader,view.lang,view.uri);
				_panel.onClose = close;
				
				var list:Array = [{url:"assets/icon/newFunctionPreview/1.png"},{url:"assets/icon/newFunctionPreview/2.png"},{url:"assets/icon/newFunctionPreview/3.png"}];
				
				_panel.changeData(list);
				
				this.addView(_panel);
			}
		}
		
		public override function close():void
		{
			closeView(this);
			view.background.show();
			view.guide.show();
			view.mainPanel.show();
		}
		
		public override function clear():void
		{
			_panel.clear();
		}
	}
}